function getStaticDataStore(code){
	var store  = Ext.create('Ext.data.Store',{
	    // xtype: 'Ext.data.Store',
	     //singleton : true,
	     proxy:{ 
	     	type:'ajax',
	     	url: 'publicDictAction.action' ,     
	     	async: false,
	     	reader: { 
	     		type: 'json', 
	     		root: 'list' 
	     	},
	     	extraParams:{
	     		publicCode:code
	     	}
	     },
	     fields:['valueId','valueName'],
	     autoLoad: true        
	 });
	return store; 
}
function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var seperator2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
            + " " + date.getHours() + seperator2 + date.getMinutes()
            + seperator2 + date.getSeconds();
    return currentdate;
}
function compareDate(date1,date2){
/*	//先比较日期
	var str;
	str = date1.split(" ");
	var strDate1 = str[0]; 
	DateTime a = DateTime.parse(date1);
	DateTime b = DateTime.parse(date2);
	if(a > b){
		return 1;
	}else if(a < b){
		return -1;
	}else{
		return 0;
	}*/
	
}
Date.prototype.format = function(format){ 
	var o = { 
	"M+" : this.getMonth()+1, //month 
	"d+" : this.getDate(), //day 
	"h+" : this.getHours(), //hour 
	"m+" : this.getMinutes(), //minute 
	"s+" : this.getSeconds(), //second 
	"q+" : Math.floor((this.getMonth()+3)/3), //quarter 
	"S" : this.getMilliseconds() //millisecond 
	} 

	if(/(y+)/.test(format)) { 
	format = format.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
	} 

	for(var k in o) { 
	if(new RegExp("("+ k +")").test(format)) { 
	format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length)); 
	} 
	} 
	return format; 
	}
function comptime(date1,date2) {
   /* var date1 = "2009-09-21 00:00:00";
    var date2 = "2009-09-21 00:00:01";*/
    var beginTimes = date1.substring(0, 10).split('-');
    var endTimes = date2.substring(0, 10).split('-');

    date1 = beginTimes[1] + '-' + beginTimes[2] + '-' + beginTimes[0] + ' ' + date1.substring(10, 19);
    date2 = endTimes[1] + '-' + endTimes[2] + '-' + endTimes[0] + ' ' + date2.substring(10, 19);

  
    var a = (Date.parse(date2) - Date.parse(date1)) / 3600 / 1000;
    if (a < 0) {
        return true;
    } else if (a > 0) {
        return false;
    } else if (a == 0) {
        return true;
    }
}